home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 701-725 / 723 / printerctrl / printerctrl.doc < prev    next >
Text File  |  1995-03-18  |  12KB  |  296 lines

  1.  
  2.         INSTRUCTIONS FOR PrinterCTRL VERSION: 1.00  July 1992
  3.         =====================================================
  4.  
  5.  
  6.   Contents
  7.   --------
  8.  
  9.     O.     Installation
  10.     I.     Description
  11.     II.     Overview of major features
  12.     III. Functions
  13.     IV.  Miscellaneous
  14.     V.   Compiling Source
  15.     VI.  Credits
  16.  
  17.  
  18.  
  19. O.  Installation
  20. ----------------
  21.  
  22. The only installation requirement is that the 'req.library'(version 2.0
  23. or greater) exists in the LIBS: assigned directory.  I have included this
  24. file in it's original archive and have abided by the copyright of the authors
  25. by including their complete archive in the directory 'ReqLibs'
  26.  
  27. You can simply copy the 'req.library' file as follows:
  28.  
  29.     From a Shell window, CD to directory in which files were decompressed.
  30.     eg. CD RAM:
  31.  
  32.     Copy the 'req.library' file to LIBS:
  33.     eg. COPY RAM:ReqLibs/req.library LIBS:
  34.  
  35.  
  36. You might also want to make sure that the proper printer driver is selected
  37. in Preferences as PrinterCTRL uses the selected driver to perform some of 
  38. it's operations.
  39.  
  40. PrinterCTRL can be run from a CLI window (it detaches itself to run in the
  41. background) or from an icon on the workbench.  Have fun and READ THE DOCS.
  42.  
  43.  
  44.  
  45. I.  DESCRIPTION
  46. ---------------
  47.  
  48. PrinterCTRL is a WB1.3/2.0 compatible interface program for parallel printers
  49. with some uses for those using serial printers.  The program allows the user
  50. to quickly send predefined or custom printer driver codes to the printer.  
  51.  
  52. There are hundreds of printers on the market, each one unique in some fashion.
  53. They all come with these little spiral bound books full of printer codes and
  54. commands that almost no one has ever used.  I always uses these two compressed
  55. pitch fonts on my RAVEN PR-2417 (EpsonQ) and it is simpler to send the proper
  56. code to the printer than to have to take it offline play with some buttons
  57. and put it back on line.  Did I mention that I had to get out of my chair!
  58.  
  59. Now all I have to do it startup PrinterCTRL, select gadget 'HEX' and type 
  60. directly from my printer manual:  1B,50,01 <- Compressed Pitch 
  61.  
  62. Program will even tell you if your printer is offline or out of paper which is
  63. useful if the printer is in another room.
  64.  
  65. As well as sending RAW hex codes you are also able to send commands directly
  66. to the printer.device.  These decimal codes correspond to a predetermined
  67. action by the printer.  A complete list follows.  Note that not all commands
  68. may be supported by the driver that you are using.  eg. 'RLF' reverse line
  69. feed is a valid command but my printer does not respond.  In that event a
  70. error message will be generated on the title bar.
  71.  
  72.  
  73.  
  74. II.     Overview of major features
  75. -------------------------------
  76.  
  77. There are 26 gadgets on the PrinterCTRL window.  The top 24 gadgets all send
  78. device driver codes to the printer.device.  The only exception is 'BELL'
  79. which sends 07 to the printer in RAW format.  After you release any gadget
  80. the status gadget will update the current condition of the parallel port
  81. and then will attempt to send your command to the printer.  If everything
  82. proceeds properly, the title bar will display your last command and either
  83. Ok! or ERROR!  In the case of error it is usually an invalid driver command
  84. or a file not found by the PRINT command.
  85.  
  86. The program open both the parallel.device and the printer.device as they
  87. are required.  That is, only to send the commands and check parallel status.
  88. When you are not sending a function, both these devices are closed.  BTW,
  89. these devices are not both opened at the same time...seems they can't be.
  90.  
  91. Added is the ability to send a file to the printer.  By selecting the 'PRINT
  92. FILE' gadget you can send the contents of the file to the printer which
  93. you have preconfigured with you desired options.  You may also use this 
  94. program to send commands to the printer so that another program may properly
  95. use a certain option available to your printer. 
  96.  
  97.  
  98.  
  99. III. Functions
  100. --------------
  101.  
  102. The following is a list of allowable printer driver commands which are
  103. selected by using the predefined or the 'CMD' gadget.  I do not have 
  104. support for those functions that take parameters.  It is better to look
  105. up the proper HEX code in you printer manual and send that command
  106. instead (parameters are supported there).
  107.  
  108. eg. To turn off Skip perforation -> 'CMD' 59
  109.     To turn on underline -> 'CMD' 8
  110.  
  111.  
  112. aRIS     0   ESCC       reset                  ISO 
  113. aRIN     1   ESC#1      initialize              +++ 
  114. aIND     2   ESCD       lf                      ISO 
  115. aNEL     3   ESCE       return,lf              ISO 
  116. aRI         4   ESCM       reverse lf              ISO 
  117.  
  118. aSGR0     5   ESC[0m     normal char set          ISO 
  119. aSGR3     6   ESC[3m     italics on              ISO 
  120. aSGR23     7   ESC[23m    italics off              ISO 
  121. aSGR4     8   ESC[4m     underline on          ISO 
  122. aSGR24     9   ESC[24m    underline off          ISO 
  123. aSGR1    10   ESC[1m     boldface on              ISO 
  124. aSGR22    11   ESC[22m    boldface off          ISO 
  125. aSFC    12   SGR30-39   set foreground color  ISO 
  126. aSBC    13   SGR40-49   set background color  ISO 
  127.  
  128. aSHORP0 14   ESC[0w     normal pitch          DEC 
  129. aSHORP2 15   ESC[2w     elite on              DEC 
  130. aSHORP1 16   ESC[1w     elite off              DEC 
  131. aSHORP4 17   ESC[4w     condensed fine on     DEC 
  132. aSHORP3 18   ESC[3w     condensed off          DEC 
  133. aSHORP6 19   ESC[6w     enlarged on              DEC 
  134. aSHORP5 20   ESC[5w     enlarged off          DEC 
  135.  
  136. aDEN6    21   ESC[6"z    shadow print on          DEC (sort of) 
  137. aDEN5    22   ESC[5"z    shadow print off      DEC 
  138. aDEN4    23   ESC[4"z    doublestrike on          DEC 
  139. aDEN3    24   ESC[3"z    doublestrike off      DEC 
  140. aDEN2    25   ESC[2"z    NLQ on                  DEC 
  141. aDEN1    26   ESC[1"z    NLQ off                  DEC 
  142.  
  143. aSUS2    27   ESC[2v     superscript on          +++ 
  144. aSUS1    28   ESC[1v     superscript off          +++ 
  145. aSUS4    29   ESC[4v     subscript on          +++ 
  146. aSUS3    30   ESC[3v     subscript off          +++ 
  147. aSUS0    31   ESC[0v     normalize the line    +++ 
  148. aPLU    32   ESCL       partial line up          ISO 
  149. aPLD    33   ESCK       partial line down      ISO 
  150.  
  151. aFNT0    34   ESC(B      US char set    or Typeface             0 (default) 
  152. aFNT1    35   ESC(R      French char set    or Typeface         1 
  153. aFNT2    36   ESC(K      German char set    or Typeface         2 
  154. aFNT3    37   ESC(A      UK char set    or Typeface             3 
  155. aFNT4    38   ESC(E      Danish I char set    or Typeface     4  
  156. aFNT5    39   ESC(H      Sweden char set    or Typeface         5 
  157. aFNT6    40   ESC(Y      Italian char set    or Typeface     6 
  158. aFNT7    41   ESC(Z      Spanish char set    or Typeface     7 
  159. aFNT8    42   ESC(J      Japanese char set    or Typeface     8 
  160. aFNT9    43   ESC(6      Norweign char set    or Typeface     9 
  161. aFNT10    44   ESC(C      Danish II char set or Typeface      10 
  162.  
  163.     Suggested typefaces are:
  164.  
  165.      0 - default typeface.
  166.      1 - Line Printer or equiv.
  167.      2 - Pica or equiv.
  168.      3 - Elite or equiv.
  169.      4 - Helvetica or equiv.
  170.      5 - Times Roman or equiv.
  171.      6 - Gothic or equiv.
  172.      7 - Script or equiv.
  173.      8 - Prestige or equiv.
  174.      9 - Caslon or equiv.
  175.     10 - Orator or equiv.
  176.  
  177. aPROP2    45   ESC[2p     proportional on            +++ 
  178. aPROP1    46   ESC[1p     proportional off        +++ 
  179. aPROP0    47   ESC[0p     proportional clear      +++ 
  180. aTSS    48   ESC[n E    set proportional offset ISO 
  181. aJFY5    49   ESC[5 F    auto left justify       ISO 
  182. aJFY7    50   ESC[7 F    auto right justify      ISO 
  183. aJFY6    51   ESC[6 F    auto full justify       ISO 
  184. aJFY0    52   ESC[0 F    auto justify off        ISO 
  185. aJFY3    53   ESC[3 F    letter space (justify)  ISO (special) 
  186. aJFY1    54   ESC[1 F    word fill(auto center)  ISO (special) 
  187.  
  188. aVERP0    55   ESC[0z     1/8" line spacing       +++ 
  189. aVERP1    56   ESC[1z     1/6" line spacing       +++ 
  190. aSLPP    57   ESC[nt     set form length n       DEC 
  191. aPERF    58   ESC[nq     perf skip n (n>0)       +++ 
  192. aPERF0    59   ESC[0q     perf skip off            +++ 
  193.  
  194. aLMS    60   ESC#9      Left margin set            +++ 
  195. aRMS    61   ESC#0      Right margin set        +++ 
  196. aTMS    62   ESC#8      Top margin set            +++ 
  197. aBMS    63   ESC#2      Bottom marg set            +++ 
  198. aSTBM    64   ESC[Pn1;   Pn2r  T&B margins       DEC 
  199. aSLRM    65   ESC[Pn1;   Pn2s  L&R margin        DEC 
  200. aCAM    66   ESC#3      Clear margins            +++ 
  201.  
  202. aHTS    67   ESCH       Set horiz tab            ISO 
  203. aVTS    68   ESCJ       Set vertical tabs       ISO 
  204. aTBC0    69   ESC[0g     Clr horiz tab            ISO 
  205. aTBC3    70   ESC[3g     Clear all h tab            ISO 
  206. aTBC1    71   ESC[1g     Clr vertical tabs       ISO 
  207. aTBC4    72   ESC[4g     Clr all v tabs            ISO 
  208. aTBCALL 73   ESC#4      Clr all h & v tabs      +++ 
  209. aTBSALL 74   ESC#5      Set default tabs        +++ 
  210. aEXTEND 75   ESC[Pn"x   extended commands       +++ 
  211.  
  212. aRAW    76     ESC[Pn"r    Next 'Pn' chars are raw +++     
  213.  
  214.  
  215. By far the most powerful use of this program is to send RAW printer codes
  216. to your printer.  If you don't have or have lost your printer manual this 
  217. function becomes almost useless. :) 
  218.  
  219. You start by selecting the 'HEX' gadget and then inputting your codes.  These
  220. codes are printer specific and you must use your manual for reference.  The 
  221. codes must be 2 digit hex codes with or without a leading 0x (hex is assumed).
  222. And they can be separated by a space, comma or both.  You may have up to 10
  223. codes on a single input line.
  224.  
  225. eg.  To ring the Bell -> 'BELL' or 'HEX' 07 (works on most printers)
  226.  
  227. eg.  1/180 inch reverse direction paper feed -> 'HEX' 1B 6A FF
  228.                                           or -> 'HEX' 1b,6a,ff
  229.       ^- (specific to LQ-2500 printers)   or -> 'HEX' 1b, 6A ,Ff
  230.                                           or -> 'HEX' 0x1B 0x6A 0xFF
  231.  
  232. The 'HEX' function will not return an error message if the operation is
  233. invalid.  Be aware of some codes dumping the buffer contents of the printer
  234. to your page as it performs your new command.   
  235.  
  236. Performing a line feed 'LF' or 'CMD' 3 causes the buffer to be printed
  237. and then the line feed occurs.  This may seem buggy if you just want
  238. to advance your paper.  To be on the safe side you may perform a reset
  239. 'RST' which will flush the printer's buffer to oblivion.
  240.  
  241.  
  242.  
  243. IV.  Miscellaneous
  244. ------------------
  245.  
  246.  Upcoming Features - a) Better documentation :)
  247.                      b) More serial printer support
  248.                      c) Custom gadgets w/configuration file
  249.                      d) any suggested improvements...from users
  250.  
  251. This is freeware or (unemploymentware) and I have included the source.  You
  252. may modify and recompile for your own use but I ask that you do not modify
  253. and redistribute this archive without contacting me first.  I am giving the
  254. source away so that other programmers may benefit from it and not to make
  255. money off it.  I don't think you could....but just incase.
  256.  
  257.     Mail : Paul Miskovsky
  258.            9 Northolt Court
  259.            Toronto, Ontario
  260.            M9A 3B1
  261.            CANADA
  262.  
  263.     UUCP: paul.miskovsky@canrem.com
  264.  
  265. If you have any ideas, complaints, bugs or questions feel free to drop me a
  266. line and I will try to get back to you as soon as possible. 
  267.  
  268.  
  269.  
  270. V.   Compiling Source
  271. ---------------------
  272.  
  273. The included source compiles under SAS/C V5.10b.  It uses the includes
  274. from the developer kit release of 37.175/36.67.  All functions are
  275. prototyped and the header file is concatenated to the main and subroutine
  276. files.  There is also the LMK (make) file to aid in the compile.  You
  277. will also require the 'lreqglue.o' object file to link with the rest
  278. of the code which I have also included.  This is contained in the directory
  279. 'ReqLib' which is the full distribution for the req.library.
  280.  
  281. The code may not be the tightest but it is very readable.  Probably full 
  282. of ENFORCER hits.  I'm sorry about this but I never took advantage of
  283. Commodore's employee purchase plan to buy a system with an MMU. :)
  284.  
  285.  
  286.  
  287. VI.   Credits
  288. -------------
  289.  
  290. I would like to thank Robert S. Wagoner (Director of Product Development,
  291. Commodore Canada) for giving me that programming attitude and for being
  292. an inspiration to a starting programmer.  Yup, that's my old boss.
  293.  
  294. Amiga 1.3 RKM - Example source on parallel.device and printer.device 
  295.  
  296.